﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using mdryden.Core.Localization;

namespace LastoRevival.Service.Contracts.Models.Validation
{
	class EmailValidator
	{
		public static bool IsValid(string email)
		{
			// ensure email address has an @ sign
			// the rest of the validation will come from whether the registration email gets sent properly or not.
			// let the required/not required attribute on the property deal with whether it's required
			// empty is valid from that respect
			if (string.IsNullOrEmpty(email))
			{
				return true;
			}

			return email.Contains("@");

		}
	}
}
